.class public Les/lk;
.super Les/jk;
.source "KsAdProviderStyle2.java"


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 1
    invoke-direct {p0}, Les/jk;-><init>()V

    return-void
.end method

.method private a(Lcom/kwad/sdk/api/KsNativeAd;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;Landroid/view/ViewGroup;)V
    .locals 8

    .line 8
    invoke-virtual {p4}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/estrongs/android/pop/esclasses/ESActivity;->a(Landroid/content/Context;)Z

    move-result v0

    const/4 v1, -0x1

    if-eqz v0, :cond_0

    const-string p1, "ks2-n-s bad activity"

    .line 9
    invoke-virtual {p0, p2, p3, v1, p1}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;ILjava/lang/String;)V

    return-void

    .line 10
    :cond_0
    invoke-virtual {p4}, Landroid/view/ViewGroup;->removeAllViews()V

    .line 11
    invoke-interface {p1}, Lcom/kwad/sdk/api/KsNativeAd;->getMaterialType()I

    move-result v0

    const/4 v2, 0x1

    if-eq v0, v2, :cond_3

    const/4 v2, 0x2

    if-eq v0, v2, :cond_2

    const/4 v2, 0x3

    if-eq v0, v2, :cond_1

    const/4 p1, 0x0

    goto :goto_0

    :cond_1
    const/4 v7, 0x2

    move-object v2, p4

    move-object v3, p1

    move-object v4, p2

    move-object v5, p3

    move-object v6, p0

    .line 12
    invoke-static/range {v2 .. v7}, Les/gk;->a(Landroid/view/ViewGroup;Lcom/kwad/sdk/api/KsNativeAd;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;Les/bk;I)Landroid/view/View;

    move-result-object p1

    goto :goto_0

    :cond_2
    const/4 v7, 0x2

    move-object v2, p4

    move-object v3, p1

    move-object v4, p2

    move-object v5, p3

    move-object v6, p0

    .line 13
    invoke-static/range {v2 .. v7}, Les/hk;->a(Landroid/view/ViewGroup;Lcom/kwad/sdk/api/KsNativeAd;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;Les/bk;I)Landroid/view/View;

    move-result-object p1

    goto :goto_0

    :cond_3
    const/4 v7, 0x2

    move-object v2, p4

    move-object v3, p1

    move-object v4, p2

    move-object v5, p3

    move-object v6, p0

    .line 14
    invoke-static/range {v2 .. v7}, Les/ik;->a(Landroid/view/ViewGroup;Lcom/kwad/sdk/api/KsNativeAd;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;Les/bk;I)Landroid/view/View;

    move-result-object p1

    :goto_0
    if-eqz p1, :cond_4

    .line 15
    invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    if-nez v0, :cond_4

    const/4 p2, 0x0

    .line 16
    invoke-virtual {p4, p2}, Landroid/view/ViewGroup;->setVisibility(I)V

    .line 17
    invoke-virtual {p4, p1}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V

    goto :goto_1

    :cond_4
    const-string p1, "ks2-n-s material unknown"

    .line 18
    invoke-virtual {p0, p2, p3, v1, p1}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;ILjava/lang/String;)V

    :goto_1
    return-void
.end method

.method static synthetic a(Les/lk;Lcom/kwad/sdk/api/KsNativeAd;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;Landroid/view/ViewGroup;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1, p2, p3, p4}, Les/lk;->a(Lcom/kwad/sdk/api/KsNativeAd;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;Landroid/view/ViewGroup;)V

    return-void
.end method


# virtual methods
.method public a(Landroid/app/Activity;Landroid/view/ViewGroup;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;)V
    .locals 2

    .line 2
    invoke-static {}, Lcom/kwad/sdk/api/KsAdSDK;->getLoadManager()Lcom/kwad/sdk/api/KsLoadManager;

    move-result-object p1

    if-nez p1, :cond_0

    const/4 p1, -0x1

    const-string p2, "ks2-n-s lm null"

    .line 3
    invoke-virtual {p0, p3, p4, p1, p2}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;ILjava/lang/String;)V

    return-void

    .line 4
    :cond_0
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v0, "\u5f00\u59cb\u8bf7\u6c42\u5feb\u624b\u539f\u751f-\u5f00\u5c4f\u5e7f\u544astyle2\uff0c\u5e7f\u544aid="

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p3}, Lcom/estrongs/android/pop/app/ad/cn/AdType;->getKsIdStyle2()J

    move-result-wide v0

    invoke-virtual {p1, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    const-string v0, "AdManager"

    invoke-static {v0, p1}, Lcom/estrongs/android/util/n;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 5
    new-instance p1, Lcom/kwad/sdk/api/KsScene$Builder;

    invoke-virtual {p3}, Lcom/estrongs/android/pop/app/ad/cn/AdType;->getKsIdStyle2()J

    move-result-wide v0

    invoke-direct {p1, v0, v1}, Lcom/kwad/sdk/api/KsScene$Builder;-><init>(J)V

    const/4 v0, 0x1

    invoke-virtual {p1, v0}, Lcom/kwad/sdk/api/KsScene$Builder;->adNum(I)Lcom/kwad/sdk/api/KsScene$Builder;

    move-result-object p1

    invoke-virtual {p1}, Lcom/kwad/sdk/api/KsScene$Builder;->build()Lcom/kwad/sdk/api/KsScene;

    move-result-object p1

    .line 6
    invoke-interface {p1, v0}, Lcom/kwad/sdk/api/KsScene;->setAdNum(I)V

    .line 7
    invoke-static {}, Lcom/kwad/sdk/api/KsAdSDK;->getLoadManager()Lcom/kwad/sdk/api/KsLoadManager;

    move-result-object v0

    new-instance v1, Les/lk$a;

    invoke-direct {v1, p0, p3, p4, p2}, Les/lk$a;-><init>(Les/lk;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;Landroid/view/ViewGroup;)V

    invoke-interface {v0, p1, v1}, Lcom/kwad/sdk/api/KsLoadManager;->loadNativeAd(Lcom/kwad/sdk/api/KsScene;Lcom/kwad/sdk/api/KsLoadManager$NativeAdListener;)V

    return-void
.end method

.method public c()Lcom/estrongs/android/pop/app/ad/cn/AdChannel;
    .locals 1

    .line 1
    sget-object v0, Lcom/estrongs/android/pop/app/ad/cn/AdChannel;->TYPE_KS2:Lcom/estrongs/android/pop/app/ad/cn/AdChannel;

    return-object v0
.end method
